<?php

if (!defined('BASEPATH'))
	exit('No direct script access allowed');

class Mod_Leave_Request extends PNC_Model {

	public function Mod_Leave_Request() {
		$this->db->select('*');
		$this->db->from('pnc_leave_type');
		return $this->db->get();
	}

	public function super_type_leave() {
		$this->db->select('*');
		$this->db->from('pnc_leave_type');
		$this->db->where('sub_type', 0);
		$querys = $this->db->get();
		foreach ($querys->result_array() as $row) {
			$super[$row['lea_id']] = $row['lea_name'];
		}
		return $super;
	}

	public function type_leave() {
		$this->db->select('*');
		$this->db->from('pnc_sub_leave');
		$querys = $this->db->get();
		$leave_type[0] = '--- Select ---';
		foreach ($querys->result_array() as $row) {
			$leave_type[$row['stl_id']] = $row['stl_name'];
		}
		return $leave_type;
	}

	public function sub_type_leave() {
		$this->db->select('*');
		$this->db->from('pnc_ss_leave');
		$querys = $this->db->get();
		$sub[0] = '--- Select ---';
		foreach ($querys->result_array() as $row) {
			$sub[$row['ssl_id']] = $row['ssl_name'];
		}
		return $sub;
	}

	public function sub_type_leave_per() {
		$this->db->select('*');
		$this->db->from('pnc_leave_type');
		$this->db->where('sub_type', 4);
		$querys = $this->db->get();
		$sub_sub[0] = '--- Select ---';
		foreach ($querys->result_array() as $row) {
			$sub_sub[$row['lea_id']] = $row['lea_name'];
		}return $sub_sub;
	}

}

?>
